package router

import (
	systemController "gitee.com/wangshh_123/cross-pay-go/src/controller/system"
	"github.com/gin-gonic/gin"
)

func RegisterNotificationRoutes(r *gin.RouterGroup) {
	ctrl := systemController.NewNotificationController()
	r.POST("/notifications", ctrl.Create)
	r.GET("/notifications", ctrl.List)
	r.POST("/notifications/read", ctrl.MarkAsRead)
	r.DELETE("/notifications", ctrl.Delete)

	// 通知类型相关路由
	r.GET("/notification-types", ctrl.ListNotificationTypes)
	r.GET("/notification-types/:id", ctrl.GetNotificationType)
	r.POST("/notification-types", ctrl.CreateNotificationType)
	r.PUT("/notification-types/:id", ctrl.UpdateNotificationType)
	r.DELETE("/notification-types/:id", ctrl.DeleteNotificationType)

	// 发布通知相关路由
	r.POST("/publish", ctrl.PublishNotification)
	r.POST("/publish-batch", ctrl.PublishBatchNotification)
	r.POST("/publish-card-status", ctrl.PublishCardStatusNotification)
	r.POST("/publish-card-transaction", ctrl.PublishCardTransactionNotification)
	r.POST("/publish-system-alert", ctrl.PublishSystemAlertNotification)
	r.POST("/publish-balance-change", ctrl.PublishBalanceChangeNotification)
	r.GET("/types", ctrl.GetNotificationTypes)
}
